import request from '@/utils/request'
const GET = 'GET';
const POST = 'POST';

const COMMENT = "/pyComment"
const COMMENT_PUBLISH =  COMMENT + "/comment";
const COMMENT_LIST = COMMENT + "/get";

/**
 * 发表评论
 * @param {评论数据} data 
 */
export function publish(data){
    return request({
        url: COMMENT_PUBLISH,
        method: POST,
        data
    })
}

/**
 * 获取评论列表
 * @param {分页信息} params 
 */
export function getList(params){
    return request({
        url: COMMENT_LIST,
        method: GET,
        params
    })

}